package com.dc.ai.converter;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.dc.ai.entity.form.UserForm;
import com.dc.ai.entity.form.UserInfoForm;
import com.dc.ai.entity.po.SysUser;
import org.mapstruct.InheritInverseConfiguration;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;

@Mapper(componentModel = "spring")
public interface SysUserConverter {


    UserForm entity2Form(SysUser entity);

    @InheritInverseConfiguration(name = "entity2Form")
    SysUser form2Entity(UserForm entity);

    @Mappings({
            @Mapping(target = "id", source = "userId")
    })
    SysUser userInfoForm2Entity(UserInfoForm entity);

}
